Add context information to Oracle database reports
Adding context information to Oracle database reports is a diagnostic precaution that might be useful for troubleshooting issues caused by database overload. This helps you analyze where database load is coming from, from an application point of view. For example, you may find the application slowness happens to only a specific user. The user may have inefficient N4 preferences, bad network connections, or a custom filter or other custom objects like flex fields, custom fields or tables, that consume a lot of system resources. Sometimes it is necessary to find this user and monitor the user’s activity. It does not have a performance impact.
By default, this feature is disabled. You can enable or disable the gathering of performance statistics at startup or at runtime.
To enable the feature at startup, you must set a parameter in the N4 application nodes.
To enable the feature at runtime, you execute Groovy code in the Script Runner view.
To enable context information for Oracle at startup:
From the C:\Program Files\Navis\sparcsn4\bin directory of each N4 host, right-click the N4 executable file. For example, n4node1w.exe.
From the menu that appears on right-click, choose Run as administrator. The User Account Control dialog opens, asking you to confirm the configuration. Click Yes. The N4 configuration dialog opens.
Select the Java tab.
Scroll to the bottom of the Java Options field and add the following code segment to the bottom of the text entry box:
-Dcom.navis.performance.CollectBusinessStats=true
Save and close the N4 configuration dialog.
Repeat with all additional nodes.
You can also set only specific nodes to collect Business Context statistics. For example, if EDI creates the biggest impact on the system, you may exclude this node from statistics reports and analyze other users. Disabling this feature might also be helpful in case of any problems with driver or database overhead.
To enable Business statistics collection at runtime:
Execute the following Groovy code in the Script Runner view (Administration DBA
Script Runner) to enable Business statistics collection:
import com.navis.framework.business.Roastery;
import com.navis.framework.persistence.IBusinessContextStatsFacade ;
import com.navis.framework.portal.PortalConsts;
public class setBusinessStatsEnabled {
public String execute() {
IBusinessContextStatsFacade facade = (IBusinessContextStatsFacade) Roastery.getBean(PortalConsts.BUSINESS_CONTEXT_STATS_FACADE);
return facade.setAvailable(true);
}
}
Execute the following Groovy code in the Script runner view to disable Business statistics collection:
import com.navis.framework.business.Roastery;
import com.navis.framework.persistence.IBusinessContextStatsFacade ;
import com.navis.framework.portal.PortalConsts;
public class setBusinessStatsEnabled {
public String execute() {
IBusinessContextStatsFacade facade = (IBusinessContextStatsFacade) Roastery.getBean(PortalConsts.BUSINESS_CONTEXT_STATS_FACADE);
return facade.setAvailable(false);
}
}